package com.dhcc.bpm.modules.api.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;

import java.util.Date;

/**
 * @ClassName ApiListVo
 * @Description TODO
 * @Author sjm
 * @Date 2020/2/27 0027 18:13
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 **/
@Data
public class ApiListVo {
    private static final long serialVersionUID = 1L;
    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    private String apiName;
    /**
     * 英文名称
     */
    @ApiModelProperty(value = "英文名称")
    private String apiEName;
    /**
     * 编号
     */
    @ApiModelProperty(value = "编号")
    private String apiCode;
    /**
     * 版本
     */
    @ApiModelProperty(value = "版本")
    private String apiVersion;
    /**
     * 访问协议
     */
    @ApiModelProperty(value = "访问协议")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private Integer accessProtocol;
    /**
     * 路径
     */
    @ApiModelProperty(value = "路径")
    private String apiPath;
    /**
     * 路径
     */
    @ApiModelProperty(value = "测试路径")
    private String apiPathTest;
    /**
     * 是否需要回调地址
     */
    @ApiModelProperty(value = "是否需要回调地址")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private Integer isRequireCallbackUrl;
    /**
     * 安全认证类型
     */
    @ApiModelProperty(value = "安全认证类型")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private Integer safeType;
    /**
     * 报文类型
     */
    @ApiModelProperty(value = "报文类型")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String messageType;

    /**
     * 权限等级
     */
    @ApiModelProperty(value = "权限等级")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private Integer privilegeLevel;
    /**
     * 是否收费
     */
    @ApiModelProperty(value = "是否收费")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private Integer isCost;
    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
//    @TableField(value = "describe", keepGlobalFormat = true)
    private String describe;

    @ApiModelProperty(value = "文档附件")
    @JsonSerialize(
            using = ToStringSerializer.class
    )
    private Long busId;

    @ApiModelProperty(value = "权限中心")
    //@JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String authCenterId;

    /**
     * 创建时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 创建人
     */
    private String createUser;

    /**
     * 创建部门
     */
    private String createDept;

    /**
     * 访问协议描述
     */
    private String accessProtocolDesc;
    /**
     * 是否需要回调地址描述
     */
    private String isRequireCallbackUrlDesc;
    /**
     * 安全认证类型描述
     */
    private String safeTypeDesc;
    /**
     * 报文类型描述
     */
    private String messageTypeDesc;
    /**
     * 权限等级描述
     */
    private String privilegeLevelDesc;
    /**
     * 是否收费描述
     */
    private String isCostDesc;
    /**
     * API文档
     */
    private String apiDoc;
    /**
     * 认证类型
     */
    @ApiModelProperty(value = "认证类型")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private Integer authType;

    @ApiModelProperty(value = "请求方法")
    @JsonSerialize(using = ToStringSerializer.class,nullsUsing = NullSerializer.class)
    private String requestMethod;
}
